The Developer's Blog

Recording some thoughts of Nathan Lydick

Introduction

A continuation of the introduction to the YAML format describing the skills used by the creatures in game. This post provides an example of the workflow for creating the file describing a skill.

Workflow:

  1. Pick Attack
Stomp:
  1. Pick Animation for the Attack. It is not necess...

What is needed to define a skill or technique or attack that a creature in a video game can do? Basically, a skill is a sequence of animations and movement to apply to the character at some cost, together with the (visual, sound, etc.) effects to produce, as well as info about the damage and statuses to inflict, and the hitbox over which it applies.

Floating point math is in general pretty excellent. It generally has hardware support, and it is capable of representing both very large and very small numbers, and it has a fixed number of binary significant figures. It is generally a suitable approximation/replacement for a true "real" number in programming. But it does have some flaws. It is much more precise near zero, so if the numbers we want to represent have a small fixed range (say 0 to 1), the numbers near the 0 side will typically have less error than the other side of the range. Enter fixed point math.

A utility class to handle weighted blending of values, created for use in my transition to data-driven animations rather than hard-coded ones. A Blendable<T> is just a wrapper around a T value and a float weight with some convenience functions to allow blending between them and applying the value from a starting point (the default animation pose, if you will).